139 research outputs found

    Open Static Pointcuts Through Source Code Templates

    Get PDF
    International audienceAspect languages define ways to modularize croscutting concerns by means of expressing them as aspects. The expressiveness of an aspect language is very much affected by the expressiveness of the language it uses to describe pointcuts. This is due to the fact that pointcuts define what is crosscutting in a crosscutting concern. We present a mechanism to express type-safe source code templates in pure Java that improves the expressiveness of pointcut languages, and an extension to AspectJ that uses templates to enhance its pointcut designator language

    Recombinant Programming

    Get PDF
    This research report presents a promising new approach to computation called Recombinant Programming. The novelty of our approach is that it separates the program into two layers of computation: the recombination and the interpretation layer. The recombination layer takes sequences as inputs and allows the programmer to recombine these sequences through the definition of cohesive code units called extensions. The output of such recombination is a mesh that can be used by the interpretation layer in many different ways, depending on the context. To further illustrate our model, we present a language called Grapple that supports Recombinant Programming and show possible applications of this language. In particular, we present RJava, the prototype of a recombinant language that uses Grapple in the context of Java-like programs

    Spoon: Program Analysis and Transformation in Java

    Get PDF
    In this research report, we present Spoon, a framework for program transformation and static analysis in Java. More precisely, Spoon is an open and extensible Java compiler, written in pure Java by using Compile-time reflection techniques. We take advantage of the new features added by Java 5, and particularly of annotations and generics. Using annotations within the Spoon framework allows the programmer to extend the Java language without defining new syntactic elements, and in such a way that it is naturally supported by IDEs for Java 5 and greater. Generics, as a priceless complement, allow for the well-typing of Spoon programs that implement the programmers' language extensions. Enforcing typing naturally provides better IDE support (such as static checks, completion, documentation, and navigation), and also allows us to define a pure Java template mechanism, which we use as a tool to define well-typed and straightforward program transformations. In addition to its basic transformation capabilities, Spoon comes with a partial evaluation engine that is used to calculate the control flow of the program and to simplify the results of template-based transformations for correctness, optimization, and readability. In order to demonstrate the usability and usefulness of our framework, we present three applications, which have been chosen to cover most of Spoon's features: a translator from Java 1.4 programs into well-typed Java 5 programs, an efficient template-based AOP extension, and an automatic implementation and validation of the visitor pattern

    Using Event-Based Style for Developing M2M Applications

    Get PDF
    International audienceIn this paper, we introduce how to write M2M applications by using INI, a programming language specified and implemented by ourselves that supports event-based style. With event-based programming, all M2M communication can be handled and scheduled. Programmers may use existing built-in events or define their own events. We apply our approach in a real M2M gateway, which allows gathering and exchanging information between sensors and machines in the network. The results shows that our work proposes a concise and elegant alternative and complement to industrial state-of-the-art languages such as Java or C/C++

    Using Attribute-Oriented Programming to Leverage Fractal-Based Developments

    Get PDF
    International audienceThis paper presents the Fraclet annotation framework. The goal of Fraclet is to leverage Component-Based Software Engineering based on the Fractal component model using Attribute-Oriented Programming. We show that, using Fraclet, about 50% of the handwritten program code can be saved without loosing the semantics of the application, while the rest of the program code is automatically generated

    Aspect-Oriented Software Development with Java Aspect Components

    Get PDF
    In the last four years, our research project dealt with separation of concerns for distributed programming environments and applications. This research effort led to the implementation of the Java Aspect Component (JAC) framework for aspect-oriented programming (AOP) in Java. Among the many requirements for distribution, flexibility and adaptability play a stringent role. The high variability of executing conditions (in terms of resources, servers availability, faults, ...) also brings the need for powerful programming paradigms. This led us to develop a dynamic model of AOP which, unlike statically compiled approaches, allows to on-the-fly deploy and undeploy aspects on top of running applications. This model comes with an UML notation and an implementation. An IDE is provided with JAC to support all the development steps of an aspect oriented application, from its design, to its implementation, to its deployment

    Automatic Detection of GUI Design Smells: The Case of Blob Listener

    Get PDF
    International audienceGraphical User Interfaces (GUIs) intensively rely on event-driven programming: widgets send GUI events, which capture users' interactions, to dedicated objects called controllers. Controllers implement several GUI listeners that handle these events to produce GUI commands. In this work, we conducted an empirical study on 13 large Java Swing open-source software systems. We study to what extent the number of GUI commands that a GUI listener can produce has an impact on the change-and fault-proneness of the GUI listener code. We identify a new type of design smell, called Blob listener that characterizes GUI listeners that can produce more than two GUI commands. We show that 21 % of the analyzed GUI controllers are Blob listeners. We propose a systematic static code analysis procedure that searches for Blob listener that we implement in InspectorGuidget. We conducted experiments on six software systems for which we manually identified 37 instances of Blob listener. InspectorGuidget successfully detected 36 Blob listeners out of 37. The results exhibit a precision of 97.37 % and a recall of 97.59 %. Finally, we propose coding practices to avoid the use of Blob listeners

    Spoon: A Library for Implementing Analyses and Transformations of Java Source Code

    Get PDF
    update for oadoi on Nov 02 2018International audienceThis paper presents SPOON, a library for the analysis and transformation of Java source code. SPOON enables Java developers to write a large range of domain-specific analyses and transformations in an easy and concise manner. SPOON analyses and transformations are written in plain Java. With SPOON, developers do not need to dive into parsing, to hack a compiler infrastructure, or to master a new formalism

    Design and Characterization of an Electrically Powered Single Molecule on Gold

    Get PDF
    The surface diffusion of individual molecules is of paramount importance in self-assembly processes and catalytic processes. However, the fundamental understanding of molecule diffusion peculiarities considering conformations and adsorption sites remain poorly known at the atomic scale. Here, we probe the 4â€Č-(4-tolyl)-2,2â€Č:6â€Č,2″-terpyridine adsorbed on the Au(111) herringbone structure combining scanning tunneling microscopy and atomic force microscopy. Molecules are controllably translated by electrons excitations over the reconstruction, except at elbows acting as pinning centers. Experimental data supported by theoretical calculations show the formation of coordination bonds between the molecule and Au atoms of the surface. Using force spectroscopy, we quantify local variation of the surface potential and the lateral force required to move the molecule. We found an elevation of the diffusion barrier at elbows of the reconstruction of ∌100 meV compared to the rest of the surface
    • 

    corecore